﻿@inherits AdminCompontentBase

<div class="pa-4" style="border: solid 1px #e9edf7;">
    <div>
        @foreach (var item in Value)
        {
            <div class="d-flex pb-3">
                <div class="ma-auto" style="width:100%">
                    <STextField @bind-Value="item.Value" />
                </div>
                <div class="ma-auto" style="width: 100px;text-align: center;">
                    =>
                </div>
                <div class="ma-auto" style="width:100%">
                    <ClaimsSelect Claims="UserClaims" Excludes="Value.Select(value => value.Key).ToList()" @bind-Value="item.Key" />               
                </div>
                <div class="ma-auto pl-1">
                    <MButton Class="mr-4" Icon OnClick="async() => await RemoveAsync(item)">
                        <SIcon Color="red">mdi-close</SIcon>
                    </MButton>
                </div>
            </div>
        }
    </div>
    <div class="hover-pointer dashed d-flex regular2--text hover-border-primary" style="height:50px;" @onclick="AddAsync">
        <div class="ma-auto subtitle">@T("Add custom JSON key map")</div>
    </div>
</div>